﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;
using RemoteServer.Framework.Portal;

namespace RemoteServer.Framework
{
    public class Configuration
    {
        static Configuration() { }

        public static string ApplicationID 
        {
            get
            {
                try
                {
                    return ConfigurationManager.AppSettings["ApplicationID"].ToString();
                }
                catch(System.Configuration.ConfigurationErrorsException ex)
                {
                    EventLog.WriteLoLog("error", ex.Message);
                    return "666";
                }
            }
        }

        public static string ApplicationSecretKey
        {
            get
            {
                try
                {
                    return ConfigurationManager.AppSettings["ApplicationSecretKey"].ToString();
                }
                catch (System.Configuration.ConfigurationErrorsException ex)
                {
                    EventLog.WriteLoLog("error", ex.Message);
                    return "666";
                }
            }
        }

        public static string APIUrl
        {
            get
            {
                try
                {
                    return ConfigurationManager.AppSettings["APIUrl"].ToString();
                }
                catch (System.Configuration.ConfigurationErrorsException ex)
                {
                    EventLog.WriteLoLog("error", ex.Message);
                    return "666";
                }
            }
        }
    }
}
